<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index');

/**
 * ============================================
 * Admin
 * ============================================
 */
Route::group(['namespace' => 'Admin'], function () {
    Route::get('/admin/home', 'HomeController@index');

    //用户
    Route::get('/admin/user', 'UserController@index');
    Route::match(['get', 'post'], '/admin/user/list', 'UserController@getList');
    Route::match(['get', 'post'], '/admin/user/getOne', 'UserController@getOne');

    //测试
    Route::get('/admin/test', 'TestController@index');
    Route::get('/admin/setRedis', 'TestController@setRedis');
    Route::get('/admin/getRedis', 'TestController@getRedis');

    Route::get('/admin/setting', 'SettingController@index');
    Route::match(['get', 'post'], '/admin/setting/list', 'SettingController@getList');
});

